<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class AlertUsefulNumToChatGroupFaq extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('chat_group_faq', function (Blueprint $table) {
            $table->unsignedInteger('usefulNum')->default(0)->comment('有用数')->after('attachment');
            $table->unsignedInteger('uselessNum')->default(0)->comment('无用数')->after('usefulNum');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('chat_group_faq', function (Blueprint $table) {
            $table->dropColumn('usefulNum');
            $table->dropColumn('uselessNum');
        });
    }
}
